function play(host) {
    var directions = ['东', '南', '西', '北'];
    var cards = [];
    for (var i = 0; i < 34; i++) {
        for (var j = 0; j < 4; j++) {
            cards.push(i)
        }
    }
    shuffle(cards);
    var playerMap = dispatch(cards, host, directions);
    var turn = host;
    var card;
    var player;
    var gang;
    var pong;
    var ch;
    while (true) {
        player = playerMap.get(turn);
        obtain(cards, player);
        if (hu(player['up'])) {
            //todo onclick
        }
        if (cards.length === 0) {
            break;
        }
        var anGangCards = anGangOptions(player['up']);
        if (anGangCards.length > 0) {
            //todo onclick gangAction
        }
        var gangCards = gangOptions(player);
        if (gangCards.length > 0) {
            //todo onclick gangAction
        }
        card = 0;//todo onclick
        discard(player, card);
        while (true) {
            var otherDirections = [next(turn), next(next(turn)), next(next(next(turn)))];
            for (i = 0; i < otherDirections.length; i++) {
                player = playerMap.get(otherDirections[i]);
                if (hu(player['up'])) {
                    //todo onclick
                }
            }
            for (i = 0; i < otherDirections.length; i++) {
                player = playerMap.get(otherDirections[i]);
                if (canGang(player['up'], card)) {
                    //todo onclick turn gangAction
                }
                if (canPong(player['up'], card)) {
                    //todo onclick turn pong
                }
            }
            if (gang) {
                break
            }
            if (!pong) {
                player = playerMap.get(next(directions, turn));
                var chOptions = chOptions(player['up'], card);
                if (chOptions.length > 0) {
                    //todo onclick turn ch
                }
            }
            if (pong || ch) {
                card = 1;//todo onclick
                discard(playerMap.get(turn), card);
            } else {
                break
            }
        }
        if (!gang) {
            turn = next(directions, turn)
        }
    }
    alert("流局")
}